package com.ygqh.baby.po;

import com.ygqh.baby.ao.DataStatus;

public class YgProductImages {
	private Long id;

	private Long productId;

	private String imagePath;

	private Boolean isMain;

	private Long sortNum;

	private DataStatus status;

	public YgProductImages() {
		super();
	}

	public YgProductImages(String imagePath, Boolean isMain, Long sortNum) {
		this.imagePath = imagePath;
		this.isMain = isMain;
		this.sortNum = sortNum;
	}

	public YgProductImages(Long productId, String imagePath, Boolean isMain, Long sortNum) {
		this.productId = productId;
		this.imagePath = imagePath;
		this.isMain = isMain;
		this.sortNum = sortNum;
	}

	public Long getId() {
		return id;
	}

	public void setId(Long id) {
		this.id = id;
	}

	public Long getProductId() {
		return productId;
	}

	public void setProductId(Long productId) {
		this.productId = productId;
	}

	public String getImagePath() {
		return imagePath;
	}

	public void setImagePath(String imagePath) {
		this.imagePath = imagePath == null ? null : imagePath.trim();
	}

	public Boolean getIsMain() {
		return isMain;
	}

	public void setIsMain(Boolean isMain) {
		this.isMain = isMain;
	}

	public Long getSortNum() {
		return sortNum;
	}

	public void setSortNum(Long sortNum) {
		this.sortNum = sortNum;
	}

	public DataStatus getStatus() {
		return status;
	}

	public void setStatus(DataStatus status) {
		this.status = status;
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = 1;
		result = prime * result + ((id == null) ? 0 : id.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (obj == null)
			return false;
		if (getClass() != obj.getClass())
			return false;
		YgProductImages other = (YgProductImages) obj;
		if (id == null) {
			if (other.id != null)
				return false;
		} else if (!id.equals(other.id))
			return false;
		return true;
	}

	@Override
	public String toString() {
		return "YgProductImages [id=" + id + ", productId=" + productId + ", imagePath=" + imagePath + ", isMain="
				+ isMain + ", sortNum=" + sortNum + ", status=" + status + "]";
	}

}